Optimal. Leaf size=35 \[ -\frac {i x}{a}-\frac {\cosh (c+d x)}{d (a+i a \sinh (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {2814, 2727}
\begin {gather*} -\frac {\cosh (c+d x)}{d (a+i a \sinh (c+d x))}-\frac {i x}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2727
Rule 2814
Rubi steps
\begin {align*} \int \frac {\sinh (c+d x)}{a+i a \sinh (c+d x)} \, dx &=-\frac {i x}{a}+i \int \frac {1}{a+i a \sinh (c+d x)} \, dx\\ &=-\frac {i x}{a}-\frac {\cosh (c+d x)}{d (a+i a \sinh (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(84\) vs. \(2(35)=70\).
time = 0.10, size = 84, normalized size = 2.40 \begin {gather*} -\frac {\left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right ) \left ((c+d x) \cosh \left (\frac {1}{2} (c+d x)\right )+i (2 i+c+d x) \sinh \left (\frac {1}{2} (c+d x)\right )\right )}{a d (-i+\sinh (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.88, size = 57, normalized size = 1.63
method | result | size |
risch | \(-\frac {i x}{a}-\frac {2}{d a \left ({\mathrm e}^{d x +c}-i\right )}\) | \(28\) |
derivativedivides | \(\frac {\frac {4 i}{-2 i+2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}+i \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-i \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d}\) | \(57\) |
default | \(\frac {\frac {4 i}{-2 i+2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}+i \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-i \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d}\) | \(57\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 36, normalized size = 1.03 \begin {gather*} -\frac {i \, {\left (d x + c\right )}}{a d} - \frac {2}{{\left (a e^{\left (-d x - c\right )} + i \, a\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 33, normalized size = 0.94 \begin {gather*} \frac {-i \, d x e^{\left (d x + c\right )} - d x - 2}{a d e^{\left (d x + c\right )} - i \, a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.08, size = 24, normalized size = 0.69 \begin {gather*} - \frac {2}{a d e^{c} e^{d x} - i a d} - \frac {i x}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 33, normalized size = 0.94 \begin {gather*} -\frac {\frac {i \, {\left (d x + c\right )}}{a} + \frac {2 i}{a {\left (i \, e^{\left (d x + c\right )} + 1\right )}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.24, size = 27, normalized size = 0.77 \begin {gather*} -\frac {x\,1{}\mathrm {i}}{a}-\frac {2}{a\,d\,\left ({\mathrm {e}}^{c+d\,x}-\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________